Carbon


KCCallbackProcPtr

Header: Keychain.h Carbon status: Under Evaluation

Defines a pointer to your keychain event callback function. Your keychain event callback function handles events that occur when the user accesses the keychain.

typedef OSStatus(* KCCallbackProcPtr) (
    KCEvent keychainEvent, 
    KCCallbackInfo *info, 
    void *userContext
);

You would declare your function like this if you were to name it MyKCCallbackCallback:

OSStatus MyKCCallback (
    KCEvent keychainEvent, 
    KCCallbackInfo *info, 
    void *userContext
);
Parameter descriptions
keychainEvent

The keychain event that your application wishes to be notified of. See “Keychain Event Constants” for a description of possible values. The type of event that can trigger your callback depends on the bitmask you passed in the eventMask parameter of the function KCAddCallback. For more information, see the discussion.

info

A pointer to a structure of type KCCallbackInfo. On return, the structure contains information about the keychain event that occurred. The Keychain Manager passes this information to your callback function via the info parameter of the function InvokeKCCallbackUPP.

userContext

A pointer to application-defined storage that your application previously passed to the function KCAddCallback. You can use this value to perform operations like track which instance of a function is operating.

function result

A result code. Your keychain event callback function should process the keychain event and return noErr.

DISCUSSION

Your keychain event callback function handles those keychain events that you indicate. In order to be notified of these events, you must pass a UPP to your notification callback function in the callbackProc parameter of KCAddCallback. You indicate the type of data transfer events you want to receive via a bitmask in the eventMask parameter. When you no longer wish to receive notification of keychain events, you should call the function KCRemoveCallback to dispose of the UPP to your keychain event callback function.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)